<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-html指令</title>
  <script src="../vue.js"></script>
</head>

<body>

  <!-- 
    作用:设置元素的innerHTML
   -->
  <div id="app">
    <div v-html="msg"></div>
  </div>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        msg: `
        <a href="https://www.baidu.com/?tn=85070231_30_hao_pg">百度</a>
        `
      }
    })
  </script>
</body>

</html>